package lxy;

public class Thread02 {
    public static void main(String[] args) {
        //线程第二中创建方式
        new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i < 10; i++) {
                    try {
                        Thread.sleep(300);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                    System.out.println("线程在运作");
                }
            }
        }).start();
    }
}
